package com.thb.pay.api.agent.fallback;

import com.thb.pay.api.agent.AgentInfoServiceApi;
import com.thb.pay.api.agent.vo.req.AgentInfoPageReq;
import com.thb.pay.api.agent.vo.req.AgentInfoReq;
import com.thb.pay.api.agent.vo.resp.AgentInfoVo;
import com.thb.pay.core.utils.PageResult;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Slf4j
@Component
public class AgentInfoServiceApiFallbackFactory implements FallbackFactory<AgentInfoServiceApi> {


    @Override
    public AgentInfoServiceApi create(Throwable throwable) {
        return new AgentInfoServiceApi() {


            @Override
            public PageResult<AgentInfoVo> findPage(@RequestBody AgentInfoPageReq pageReq) {
                return null;
            }

            @Override
            public List<AgentInfoVo> findListByAgent(AgentInfoReq agentInfoReq) {
                return null;
            }

            @Override
            public void add(@RequestBody AgentInfoReq agentInfo) {

            }

            @Override
            public AgentInfoVo getByLoginName(@RequestParam("loginName") String loginName) {
                return null;
            }

            @Override
            public AgentInfoVo getByAgentId(@RequestParam("agentId") Long agentId) {
                return null;
            }

            @Override
            public void update(AgentInfoReq agentInfoReq) {

            }
        };
    }
}